import { GaRegExp, ruleInject, ruleInjectable } from "../InjectionRule";
import { blankRemove } from "../methods/blank-remove";

@ruleInjectable()
export default class doWhilelRule extends GaRegExp {

	@ruleInject() private calcRule!: GaRegExp;

	@ruleInject() private executeRule!: GaRegExp;

	public RuleInit() {
		this.ParseRule([
			"do", this.Supply("DO_WHILE"), blankRemove, "\\{", "(", this.executeRule, ")", "\\}", blankRemove, "while", blankRemove, "\\(", blankRemove, "(", this.calcRule, ")", "\\)",
		]);
	}

}
